﻿#include "GenerateImage.h"
#include "BCQmlRenderView.h"
#include <QQuickItem>
#include <QDebug>
#include <QThread>

GenerateImage::GenerateImage(QObject *parent) : QObject(parent)
{

}

void GenerateImage::setAVideoWidget(QQuickItem *item)
{
    m_view = dynamic_cast<BCQmlRenderView*>(item);
    Q_ASSERT_X(m_view,"error","convert point error");
}

void GenerateImage::renderVideo(AVFrame * frame)
{
    if (m_view) {
        m_view->deliverFrame(frame,180,false);
    }
}
